<table>
    <tbody>
    <if condition="empty($datalist) eq true">
        <tr data-id="0">
            <td class="no-data" align="center" axis="col0" colspan="50">
                <i class="fa fa-exclamation-circle"></i>没有符合条件的记录
            </td>
        </tr>
        <else/>
        <volist name="datalist" id="v">
            <tr>
                <td align="center" class="">
                    <label>
                        <div style="text-align: center; width: 50px;">
                            <if condition="$v['status'] eq 0"><input type="checkbox" name="selected[]" value="{$v['id']}"></if>
                        </div></label>
                </td>
                <td align="center" class="">
                    <div style="text-align: center; width: 50px;">
                        {$v.id}
                    </div>
                </td>
                <td align="center" class="">
                    <div style="text-align: center; width: 50px;">{$v.user_id}</div>
                </td>
                <td align="center" class="">
                    <div style="text-align: center; width: 100px;">
                        <a class="open" href="{:U('Admin/User.User/detail',array('id'=>$v[user_id]))}" target="blank">
                            {$v.nickname}<i class="fa fa-external-link " title="新窗口打开"></i>
                        </a>
                    </div>
                </td>
                <td align="center" class="">
                    <div style="text-align: center; width: 150px;">{$v.create_time|date="Y-m-d H:i:s",###}</div>
                </td>
                <td align="center" class="">
                    <div style="text-align: center; width: 100px;">{$v.money}</div>
                </td>
                <td align="center" class="">
                    <div style="text-align: center; width: 100px;">{$v.bank_name}</div>
                </td>
                <td align="center" class="">
                    <div style="text-align: center; width: 100px;">{$v.bank_card}</div>
                </td>
                <td align="center" class="">
                    <div style="text-align: center; width: 100px;">{$v.realname}</div>
                </td>
                <td align="center" class="">
                    <div style="text-align: center; width: 100px;">{$v.taxfee}</div>
                </td>
                <td align="center" class="">
                    <div style="text-align: center; width: 100px;">
                        <if condition="$v[status] eq 0">待审核</if>
                        <if condition="$v[status] eq 1">审核通过</if>
                        <if condition="$v[status] eq -1">审核失败</if>
                        <if condition="$v[status] eq -2">无效作废</if>
                    </div>
                </td>
                <td align="left" class="handle">
                    <div style="text-align: center; width: 170px; max-width:250px;">
                        <a href="{:U('editWithdrawals',array('id'=>$v['id'],'p'=>$_GET[p]))}" class="btn blue"><i class="fa fa-pencil-square-o"></i>查看</a>
                        <if condition="$v[status] elt -1">
                            <a class="btn red"  href="javascript:void(0)" data-id="{$v[id]}" onclick="delfunc(this)" data-url="{:U('delWithdrawals')}"><i class="fa fa-trash-o"></i>删除</a>
                        </if>
                    </div>
                </td>
                <td align="" class="" style="width: 100%;">
                    <div>&nbsp;</div>
                </td>
            </tr>
        </volist>
    </if>
    </tbody>
</table>
<div class="row">
    <div class="col-sm-6 text-left"></div>
    <div class="col-sm-6 text-right">{$page}</div>
</div>
<script>
    $(".pagination  a").click(function(){
        var page = $(this).data('p');
        ajax_get_table('search-form2',page);
    });
    $( 'h5', '.ftitle').empty().html("(共{$pager->totalRows}条记录)");

    function change_engineer(table,id_name,id_value,field,obj)
    {
        var src = "";
        if($(obj).hasClass('no')) // 图片点击是否操作
        {
            //src = '/public/images/yes.png';
            $(obj).removeClass('no').addClass('yes');
            $(obj).html("<i class='fa fa-check-circle'></i>正常");
            var value = 1;

        }else if($(obj).hasClass('yes')){ // 图片点击是否操作
            $(obj).removeClass('yes').addClass('no');
            $(obj).html("<i class='fa fa-ban'></i>禁用");
            var value = 0;
        }else{ // 其他输入框操作
            var value = $(obj).val();
        }

        $.ajax({
            url:"/index.php?m=Admin&c=Index&a=changeTableVal&table="+table+"&id_name="+id_name+"&id_value="+id_value+"&field="+field+'&value='+value,
            success: function(data){
                if(!$(obj).hasClass('no') && !$(obj).hasClass('yes'))
                    layer.msg('更新成功', {icon: 1});
            }
        });
    }

</script>